﻿using Core.AutoFacService.Attributes.InjectAttributes;
using Core.AutoFacService.Enums;
using Microsoft.Extensions.Configuration;
using Quartz;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Services.Job
{
    [Inject(lifetime:LifetimeEnum.Single)]
    public class TestJob : IJob
    {
        public IConfiguration Configuration;
        public TestJob(IConfiguration Configuration)
        {
            this.Configuration = Configuration;
        }
        public Task Execute(IJobExecutionContext context)
        {
            return Task.Run(() =>
            {
                Console.WriteLine("测试执行！");
                Console.WriteLine(Configuration["AESKey"]);
            });
        }
    }
}
